<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OpenIG: OpenIG::Base::Math Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="openig_logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OpenIG
   &#160;<span id="projectnumber">2.0.7</span>
   </div>
   <div id="projectbrief">cross-platform open-source OpenSceneGraph Image Generator</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>OpenIG</b></li><li class="navelem"><b>Base</b></li><li class="navelem"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html">Math</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_open_i_g_1_1_base_1_1_math-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">OpenIG::Base::Math Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="class_open_i_g_1_1_base_1_1_math.html" title="The Math singleton class. ">Math</a> singleton class.  
 <a href="class_open_i_g_1_1_base_1_1_math.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_mathematics_8h_source.html">Mathematics.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad0cd50344d67bd24d66c846f422e37bd"><td class="memItemLeft" align="right" valign="top">osg::Matrixd&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#ad0cd50344d67bd24d66c846f422e37bd">toMatrix</a> (double x, double y, double z, double h, double p, double r)</td></tr>
<tr class="memdesc:ad0cd50344d67bd24d66c846f422e37bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates osg::Matrixd from coordinates and euler in degrees.  <a href="#ad0cd50344d67bd24d66c846f422e37bd">More...</a><br /></td></tr>
<tr class="separator:ad0cd50344d67bd24d66c846f422e37bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a496d6851a89d9663144c7da75e825a52"><td class="memItemLeft" align="right" valign="top">osg::Matrixd&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#a496d6851a89d9663144c7da75e825a52">toMuseMatrix</a> (double x, double y, double z, double h, double p, double r)</td></tr>
<tr class="memdesc:a496d6851a89d9663144c7da75e825a52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates osg::Matrixd from coordinates and euler in degrees to match Legacy Muse <a class="el" href="class_open_i_g_1_1_base_1_1_math.html" title="The Math singleton class. ">Math</a>.  <a href="#a496d6851a89d9663144c7da75e825a52">More...</a><br /></td></tr>
<tr class="separator:a496d6851a89d9663144c7da75e825a52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34272f5d649661f8bae4d32e754f4ee2"><td class="memItemLeft" align="right" valign="top">osg::Matrixd&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#a34272f5d649661f8bae4d32e754f4ee2">toViewMatrix</a> (double x, double y, double z, double h, double p, double r)</td></tr>
<tr class="memdesc:a34272f5d649661f8bae4d32e754f4ee2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates View osg::Matrixd from coordinates and euler in degrees.  <a href="#a34272f5d649661f8bae4d32e754f4ee2">More...</a><br /></td></tr>
<tr class="separator:a34272f5d649661f8bae4d32e754f4ee2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa50da5ec9d018d1f295440c2ed54cc61"><td class="memItemLeft" align="right" valign="top">osg::Quat&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#aa50da5ec9d018d1f295440c2ed54cc61">toQuat</a> (double h, double p, double r)</td></tr>
<tr class="memdesc:aa50da5ec9d018d1f295440c2ed54cc61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates osg::Quat from euler in degrees.  <a href="#aa50da5ec9d018d1f295440c2ed54cc61">More...</a><br /></td></tr>
<tr class="separator:aa50da5ec9d018d1f295440c2ed54cc61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0af63fc74ecb00b3598e5084e2cf7aa"><td class="memItemLeft" align="right" valign="top">osg::Matrixd&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#ad0af63fc74ecb00b3598e5084e2cf7aa">toGeocentricCameraMatrix</a> (double lat, double lon, double alt, double h, double p, double r)</td></tr>
<tr class="memdesc:ad0af63fc74ecb00b3598e5084e2cf7aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates osg::Matrixd from coordinates and euler in degrees.  <a href="#ad0af63fc74ecb00b3598e5084e2cf7aa">More...</a><br /></td></tr>
<tr class="separator:ad0af63fc74ecb00b3598e5084e2cf7aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78124b15d7c10f3df28936d3eb50ab68"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#a78124b15d7c10f3df28936d3eb50ab68">fromMatrix</a> (const osg::Matrixd &amp;mx, double &amp;x, double &amp;y, double &amp;z, double &amp;h, double &amp;p, double &amp;r)</td></tr>
<tr class="memdesc:a78124b15d7c10f3df28936d3eb50ab68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decompose a matrix to coordinates and euler.  <a href="#a78124b15d7c10f3df28936d3eb50ab68">More...</a><br /></td></tr>
<tr class="separator:a78124b15d7c10f3df28936d3eb50ab68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc597e043f08065fe1af48e0d605ca71"><td class="memItemLeft" align="right" valign="top">osg::Vec3d&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#abc597e043f08065fe1af48e0d605ca71">fromQuat</a> (const osg::Quat &amp;q)</td></tr>
<tr class="memdesc:abc597e043f08065fe1af48e0d605ca71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Euler from osg::Quat ernion.  <a href="#abc597e043f08065fe1af48e0d605ca71">More...</a><br /></td></tr>
<tr class="separator:abc597e043f08065fe1af48e0d605ca71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58cecd2d678eba08a7d729070fd750e5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#a58cecd2d678eba08a7d729070fd750e5">fixVerticalAxis</a> (osg::Vec3d &amp;eye, osg::Quat &amp;rotation, bool disallowFlipOver=true)</td></tr>
<tr class="memdesc:a58cecd2d678eba08a7d729070fd750e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Code snippet borrowed from osgGA::StandardManipulator. Please refer to the OSG documentation.  <a href="#a58cecd2d678eba08a7d729070fd750e5">More...</a><br /></td></tr>
<tr class="separator:a58cecd2d678eba08a7d729070fd750e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a678a328467fae308c6c0927a6108499f"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_open_i_g_1_1_base_1_1_math.html">Math</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#a678a328467fae308c6c0927a6108499f">instance</a> ()</td></tr>
<tr class="memdesc:a678a328467fae308c6c0927a6108499f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The singleton.  <a href="#a678a328467fae308c6c0927a6108499f">More...</a><br /></td></tr>
<tr class="separator:a678a328467fae308c6c0927a6108499f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a3822d162b6a31db2a2df2727fdaa8fc8"><td class="memItemLeft" align="right" valign="top"><a id="a3822d162b6a31db2a2df2727fdaa8fc8"></a>
static const float&#160;</td><td class="memItemRight" valign="bottom"><b>M_PER_FT</b></td></tr>
<tr class="separator:a3822d162b6a31db2a2df2727fdaa8fc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04fb2e2c13fafcc3ec26dac923835392"><td class="memItemLeft" align="right" valign="top"><a id="a04fb2e2c13fafcc3ec26dac923835392"></a>
static const float&#160;</td><td class="memItemRight" valign="bottom"><b>M_PER_NMI</b></td></tr>
<tr class="separator:a04fb2e2c13fafcc3ec26dac923835392"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49faaa8135e55f7053d9a30406e6b4f3"><td class="memItemLeft" align="right" valign="top"><a id="a49faaa8135e55f7053d9a30406e6b4f3"></a>
static const float&#160;</td><td class="memItemRight" valign="bottom"><b>FT_PER_M</b></td></tr>
<tr class="separator:a49faaa8135e55f7053d9a30406e6b4f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f63d5dc6f8f34f4564861229d527c77"><td class="memItemLeft" align="right" valign="top"><a id="a5f63d5dc6f8f34f4564861229d527c77"></a>
static const float&#160;</td><td class="memItemRight" valign="bottom"><b>FT_PER_NMI</b></td></tr>
<tr class="separator:a5f63d5dc6f8f34f4564861229d527c77"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a871657bd51737fe8d4c8e0c0223dc6df"><td class="memItemLeft" align="right" valign="top">osg::Vec3d&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#a871657bd51737fe8d4c8e0c0223dc6df">getUpVector</a> (const osg::CoordinateFrame &amp;cf)</td></tr>
<tr class="memdesc:a871657bd51737fe8d4c8e0c0223dc6df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Code snippet borrowed from osgGA::StandardManipulator. Please refer to the OSG documentation.  <a href="#a871657bd51737fe8d4c8e0c0223dc6df">More...</a><br /></td></tr>
<tr class="separator:a871657bd51737fe8d4c8e0c0223dc6df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a033876378537103ac510f24b3e072e69"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_open_i_g_1_1_base_1_1_math.html#a033876378537103ac510f24b3e072e69">fixVerticalAxis</a> (osg::Quat &amp;rotation, const osg::Vec3d &amp;localUp, bool disallowFlipOver=true)</td></tr>
<tr class="memdesc:a033876378537103ac510f24b3e072e69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Code snippet borrowed from osgGA::StandardManipulator. Please refer to the OSG documentation.  <a href="#a033876378537103ac510f24b3e072e69">More...</a><br /></td></tr>
<tr class="separator:a033876378537103ac510f24b3e072e69"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="class_open_i_g_1_1_base_1_1_math.html" title="The Math singleton class. ">Math</a> singleton class. </p>
<p>The <a class="el" href="class_open_i_g_1_1_base_1_1_math.html" title="The Math singleton class. ">Math</a> singleton class. Contais convinient handy methods </p><dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a58cecd2d678eba08a7d729070fd750e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58cecd2d678eba08a7d729070fd750e5">&#9670;&nbsp;</a></span>fixVerticalAxis() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OpenIG::Base::Math::fixVerticalAxis </td>
          <td>(</td>
          <td class="paramtype">osg::Vec3d &amp;&#160;</td>
          <td class="paramname"><em>eye</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">osg::Quat &amp;&#160;</td>
          <td class="paramname"><em>rotation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>disallowFlipOver</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Code snippet borrowed from osgGA::StandardManipulator. Please refer to the OSG documentation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eye</td><td></td></tr>
    <tr><td class="paramname">rotation</td><td></td></tr>
    <tr><td class="paramname">disallowFlipOver</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="a033876378537103ac510f24b3e072e69"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a033876378537103ac510f24b3e072e69">&#9670;&nbsp;</a></span>fixVerticalAxis() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void OpenIG::Base::Math::fixVerticalAxis </td>
          <td>(</td>
          <td class="paramtype">osg::Quat &amp;&#160;</td>
          <td class="paramname"><em>rotation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const osg::Vec3d &amp;&#160;</td>
          <td class="paramname"><em>localUp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>disallowFlipOver</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Code snippet borrowed from osgGA::StandardManipulator. Please refer to the OSG documentation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rotation</td><td></td></tr>
    <tr><td class="paramname">localUp</td><td></td></tr>
    <tr><td class="paramname">disallowFlipOver</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="a78124b15d7c10f3df28936d3eb50ab68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78124b15d7c10f3df28936d3eb50ab68">&#9670;&nbsp;</a></span>fromMatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OpenIG::Base::Math::fromMatrix </td>
          <td>(</td>
          <td class="paramtype">const osg::Matrixd &amp;&#160;</td>
          <td class="paramname"><em>mx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>z</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decompose a matrix to coordinates and euler. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mx</td><td>the matrix </td></tr>
    <tr><td class="paramname">x</td><td>resulting x coordinate </td></tr>
    <tr><td class="paramname">y</td><td>resulting y coordinate </td></tr>
    <tr><td class="paramname">z</td><td>resulting z coordinate </td></tr>
    <tr><td class="paramname">h</td><td>resulting heading in degrees </td></tr>
    <tr><td class="paramname">p</td><td>resulting pitch in degrees </td></tr>
    <tr><td class="paramname">r</td><td>resulting roll in degrees </td></tr>
  </table>
  </dd>
</dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="abc597e043f08065fe1af48e0d605ca71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc597e043f08065fe1af48e0d605ca71">&#9670;&nbsp;</a></span>fromQuat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osg::Vec3d OpenIG::Base::Math::fromQuat </td>
          <td>(</td>
          <td class="paramtype">const osg::Quat &amp;&#160;</td>
          <td class="paramname"><em>q</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Euler from osg::Quat ernion. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">the</td><td>Quaternion </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>eulers in degrees, x() heading, y() pitch, z() roll </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="a871657bd51737fe8d4c8e0c0223dc6df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a871657bd51737fe8d4c8e0c0223dc6df">&#9670;&nbsp;</a></span>getUpVector()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">osg::Vec3d OpenIG::Base::Math::getUpVector </td>
          <td>(</td>
          <td class="paramtype">const osg::CoordinateFrame &amp;&#160;</td>
          <td class="paramname"><em>cf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Code snippet borrowed from osgGA::StandardManipulator. Please refer to the OSG documentation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cf</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="a678a328467fae308c6c0927a6108499f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a678a328467fae308c6c0927a6108499f">&#9670;&nbsp;</a></span>instance()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="class_open_i_g_1_1_base_1_1_math.html">Math</a>* OpenIG::Base::Math::instance </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The singleton. </p>
<dl class="section return"><dt>Returns</dt><dd>The singleton </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="ad0af63fc74ecb00b3598e5084e2cf7aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0af63fc74ecb00b3598e5084e2cf7aa">&#9670;&nbsp;</a></span>toGeocentricCameraMatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osg::Matrixd OpenIG::Base::Math::toGeocentricCameraMatrix </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>lat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>lon</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>alt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates osg::Matrixd from coordinates and euler in degrees. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">lat</td><td>latitude coordinate in degrees </td></tr>
    <tr><td class="paramname">lon</td><td>longitude coordinate in degrees </td></tr>
    <tr><td class="paramname">alt</td><td>altitude coordinate in meters </td></tr>
    <tr><td class="paramname">h</td><td>heading in degrees </td></tr>
    <tr><td class="paramname">p</td><td>pitch in degrees </td></tr>
    <tr><td class="paramname">r</td><td>roll in degrees </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>matrix </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sat 14 May 2016 </dd></dl>

</div>
</div>
<a id="ad0cd50344d67bd24d66c846f422e37bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0cd50344d67bd24d66c846f422e37bd">&#9670;&nbsp;</a></span>toMatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osg::Matrixd OpenIG::Base::Math::toMatrix </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>z</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates osg::Matrixd from coordinates and euler in degrees. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x coordinate </td></tr>
    <tr><td class="paramname">y</td><td>y coordinate </td></tr>
    <tr><td class="paramname">z</td><td>z coordinate </td></tr>
    <tr><td class="paramname">h</td><td>heading in degrees </td></tr>
    <tr><td class="paramname">p</td><td>pitch in degrees </td></tr>
    <tr><td class="paramname">r</td><td>roll in degrees </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>matrix </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2015 </dd></dl>

</div>
</div>
<a id="a496d6851a89d9663144c7da75e825a52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a496d6851a89d9663144c7da75e825a52">&#9670;&nbsp;</a></span>toMuseMatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osg::Matrixd OpenIG::Base::Math::toMuseMatrix </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>z</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates osg::Matrixd from coordinates and euler in degrees to match Legacy Muse <a class="el" href="class_open_i_g_1_1_base_1_1_math.html" title="The Math singleton class. ">Math</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x coordinate </td></tr>
    <tr><td class="paramname">y</td><td>y coordinate </td></tr>
    <tr><td class="paramname">z</td><td>z coordinate </td></tr>
    <tr><td class="paramname">h</td><td>heading in degrees </td></tr>
    <tr><td class="paramname">p</td><td>pitch in degrees </td></tr>
    <tr><td class="paramname">r</td><td>roll in degrees </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>matrix </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Roni Zanolli <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun Jan 11 2000 </dd></dl>

</div>
</div>
<a id="aa50da5ec9d018d1f295440c2ed54cc61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa50da5ec9d018d1f295440c2ed54cc61">&#9670;&nbsp;</a></span>toQuat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osg::Quat OpenIG::Base::Math::toQuat </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates osg::Quat from euler in degrees. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">h</td><td>heading in degrees </td></tr>
    <tr><td class="paramname">p</td><td>pitch in degrees </td></tr>
    <tr><td class="paramname">r</td><td>roll in degrees </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>quaternion </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Sun May 15 2016 </dd></dl>

</div>
</div>
<a id="a34272f5d649661f8bae4d32e754f4ee2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34272f5d649661f8bae4d32e754f4ee2">&#9670;&nbsp;</a></span>toViewMatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">osg::Matrixd OpenIG::Base::Math::toViewMatrix </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>z</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates View osg::Matrixd from coordinates and euler in degrees. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>x coordinate </td></tr>
    <tr><td class="paramname">y</td><td>y coordinate </td></tr>
    <tr><td class="paramname">z</td><td>z coordinate </td></tr>
    <tr><td class="paramname">h</td><td>heading in degrees </td></tr>
    <tr><td class="paramname">p</td><td>pitch in degrees </td></tr>
    <tr><td class="paramname">r</td><td>roll in degrees </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>matrix </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Trajce Nikolov Nick <a href="#" onclick="location.href='mai'+'lto:'+'ope'+'ni'+'g@c'+'om'+'pro'+'.n'+'et'; return false;">openi<span style="display: none;">.nosp@m.</span>g@co<span style="display: none;">.nosp@m.</span>mpro.<span style="display: none;">.nosp@m.</span>net</a> </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>(c)Compro Computer Services, Inc. </dd></dl>
<dl class="section date"><dt>Date</dt><dd>Thu Jun 23 2016 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Core-Base/<a class="el" href="_mathematics_8h_source.html">Mathematics.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed May 16 2018 15:41:11 for OpenIG by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
